laravel loop through collection

56

laravel loop through collection -

$users = App\User::where('active', 1)->get();

foreach ($users as $user) {
    echo $user->name;
}

Comments

Submit
0 Comments